<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>

        #ul1 li{
            background-color: #86CB05;
            width: 120px;
            height: 40px;
            text-align: center;
            line-height: 40px;
            margin: 5px;
            border-radius: 10px;
            display: block;
            float: left;

        }

        #ul1 li:hover{
            background-color: #278017;

        }

        #ul1>li:first-child{
            position: relative;
            border: 1px solid;
        }
        #ul1 #ul2{
            position: absolute;
            border: 1px solid;
            padding: 0;
            display: none;

        }
        #ul1 #ul2>li{
            margin-left: 0;
            width: 200px;

        }

        #a1:hover > #ul2{
            display: block;
        }
    </style>
</head>
<body>


<ul id="ul1">
    <li id="a1">
        <a href="#">章节</a>
        <ul id="ul2">
            <li><a>python</a></li>
            <li><a>go</a></li>
        </ul>
    </li>
    <li id="li2">
        <a href="#" id="a2">问答</a>
    </li>
    <li>
        <a href="#">笔记</a>
    </li>
    <li>
        <a href="#">提问</a>
    </li>

</ul>
</body>
</html>